<?php declare(strict_types=1);
namespace Unit;
use PHPUnit\Framework\Attributes\Test,
    PHPUnit\Framework\Attributes\DataProvider;

class PingTest extends \PHPUnit\Framework\TestCase
{
    /**
     * @return void
     */
    #[Test]
    #[DataProvider('pingProvider')]
    public function ping(string $ping): void {
        $pong = '';

        if($ping === 'ping'){
            $pong = 'pong';
        }else{
            $pong = $ping;
        }

        $this->expectOutputString('pong');

        echo $pong;
    }

    public static function pingProvider(): array {
        return [
            'ping' => ['ping']
        ];
    }
}